<%@ page contentType="text/html; charset=GB2312"%>
<%@ page language="java" import="com.demo.util.Conn,java.sql.ResultSet"%>
<%
  	if(session.getAttribute("admin_user_id")==null)
  		response.sendRedirect("login.jsp");
	int nVal = 0;
	int nStudentNum = 0;
	int nFStudentNum = 0;
	int nRecruitersNum = 0;
	int nActiveRecruitersNum = 0;
	int nFRecruitersNum = 0;
	int nAdministratorsNum = 0;
	int nJobsNum = 0;
	int nAcitveJobsNum = 0;
	int nExpiredJobsNum = 0;
	int ndeletedJobsNum = 0;
	int nFJobsNum = 0;
	Conn objConn;
	ResultSet rs;
	
	StringBuffer sql = new StringBuffer();
	sql.delete(0, sql.length());
	objConn = new Conn();
	
	sql.append("select count(*) as num from DBF_StuUser");
	rs = objConn.find(sql.toString());
	if (rs != null && rs.next()){
		nStudentNum = rs.getInt("num");
		nFStudentNum = nStudentNum;
		rs.close();
	}
	
	
	sql.delete(0, sql.length());
	sql.append("select count(*) as num from DBF_INDUSTRY_INFO");
	rs = objConn.find(sql.toString());
	if (rs != null && rs.next()){
		nRecruitersNum = rs.getInt("num");
		nActiveRecruitersNum = nRecruitersNum;
		nFRecruitersNum = nActiveRecruitersNum;
		rs.close();
	}
	
	sql.delete(0, sql.length());
	sql.append("select count(*) as num from DBF_ADMIN_USER");
	rs = objConn.find(sql.toString());
	if (rs != null && rs.next()){
		nAdministratorsNum = rs.getInt("num");
		rs.close();
	}
	
	sql.delete(0, sql.length());
	sql.append("select count(*) as num from DBF_JOB_INFO");
	rs = objConn.find(sql.toString());
	if (rs != null && rs.next()){
		nJobsNum = rs.getInt("num");
		nFJobsNum = nJobsNum;
		nAcitveJobsNum = nJobsNum;
		rs.close();
	}

%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
  	<link rel="stylesheet" type="text/css" href="../style.css">
  </head>
  
  <body>
	<table width="718" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="39" colspan="3" background="../images/main_title.jpg"><strong>&nbsp;&nbsp;<span class="menutitle">General Reports</span></strong></td>
      </tr>
      <tr>
        <td valign="bottom"><img src="../images/menu_a.jpg" width="19" height="23" /></td>
        <td valign="top">&nbsp;</td>
        <td valign="bottom"><img src="../images/menu_b.jpg" width="18" height="23" /></td>
      </tr>
      <tr>
        <td width="19" valign="top" background="../images/menu_c.jpg"><img src="../images/menu_c.jpg" width="19" height="54" /></td>
        <td width="681" valign="top"><table width="100%" class="logintxt">

          <tr>
            <td width="20%" align="left">Total no of students:&nbsp;</td>
            <td width="20%" align="left" style="color:red;text-align:center">&nbsp;<%=nStudentNum %></td>
            <td width="20%" align="left">Total no of jobs:&nbsp;</td>
            <td width="20%" align="left" style="color:red;text-align:center">&nbsp;<%=nJobsNum %></td>
          </tr>
          <tr>
            <td width="20%" align="left">Total no of featured students:&nbsp;</td>
            <td width="20%" align="left" style="color:red;text-align:center">&nbsp;<%=nFStudentNum %></td>
            <td width="20%" align="left">Total no of active jobs :&nbsp;</td>
            <td width="20%" align="left" style="color:red;text-align:center">&nbsp;<%=nAcitveJobsNum %></td>
          </tr>
          <tr>
            <td width="20%" align="left">Total no of recruiters :&nbsp;</td>
            <td width="20%" align="left" style="color:red;text-align:center">&nbsp;<%=nRecruitersNum %></td>
            <td width="20%" align="left">Total no of expired jobs:&nbsp;</td>
            <td width="20%" align="left" style="color:red;text-align:center">&nbsp;<%=nExpiredJobsNum %></td>
          </tr>
          <tr>
            <td width="20%" align="left">Total no of active recruiters:&nbsp;</td>
            <td width="20%" align="left" style="color:red;text-align:center">&nbsp;<%=nActiveRecruitersNum %></td>
            <td width="20%" align="left">Total no of deleted jobs :&nbsp;</td>
            <td width="20%" align="left" style="color:red;text-align:center">&nbsp;<%=ndeletedJobsNum %></td>
          </tr>
          <tr>
            <td width="20%" align="left">Total no of featured recruiters:&nbsp;</td>
            <td width="20%" align="left" style="color:red;text-align:center">&nbsp;<%=nFRecruitersNum %></td>
            <td width="20%" align="left">Total no of featured jobs :&nbsp;</td>
            <td width="20%" align="left" style="color:red;text-align:center">&nbsp;<%=nFJobsNum %></td>
          </tr>
          <tr>
            <td width="20%" align="left">Total no of administrator :&nbsp;</td>
            <td width="20%" align="left" style="color:red;text-align:center">&nbsp;<%=nAdministratorsNum %></td>
            <td width="20%" align="left">Total no of other jobs  :&nbsp;</td>
            <td width="20%" align="left" style="color:red;text-align:center">&nbsp;<%=nVal %></td>
          </tr>
          <tr>
            <td colspan="4" align="center">&nbsp;</td>
          </tr>
          <tr>
            <td colspan="4" align="center"><input name="button" type="image" src="../images/export_btn.jpg" onClick="javascript:window.open('reportExcel.jsp')" value="Export to EXCEL">            </td>
          </tr>
        </table></td>
        <td width="18" valign="top" background="../images/menu_d.jpg"><img src="../images/menu_d.jpg" width="18" height="54" /></td>
      </tr>
      <tr>
        <td><img src="../images/menu_e.jpg" width="19" height="25" /></td>
        <td background="../images/menu_f.jpg"><img src="../images/menu_f.jpg" width="181" height="25" /></td>
        <td><img src="../images/menu_g.jpg" width="18" height="25" /></td>
      </tr>
    </table>
	<br>
	<br>
  </body>
</html>
